﻿<h1>User</h1>
<ul data-template="user-template" data-bind="source: user">
</ul>

<script type="text/x-kendo-template" id="user-template">
    <div>
    <strong>Username: </strong>
    <span>#= username # </span>
    <span>Balance: </span>
    <span>#= balance # </span>
    <span>Admin Permissions: </span>
    <span>#= isAdmin # </span>
    <button data-bind="click: deposit">Deposit money</button>
    </div>
    <div>
    # for (var i = 0; i < books.length; i++) { #
        <div>
        <strong>Title: </strong>
        <span>#= books[i].title # </span>
        <strong>Author: </strong>
        <span>#= books[i].author # </span>
        <span>Genre: </span>
        <span>#= books[i].genre # </span>
        <span>Pages: </span>
        <span>#= books[i].pages # </span>
        <strong>RentCost: $</strong>
        <span>#= books[i].rentCost # </span>
        <button data-bind="click: returnBook" data-bookId="#= books[i].id #">Rent the book</button>
        </div>
    # } #
    </div>
</script>